﻿using System;
using DAL;
using Ext.Net;

namespace ERP.Modules.Report
{
    public partial class ReportLiabilities_Payment_Deadline_Receiver : System.Web.UI.UserControl
    {
        readonly clsConnect Cls = new clsConnect();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                GetData();
            }
        }

        protected void StoreReportLiabilities_Payment_Deadline_Receiver_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            GetData();
        }

        void GetData()
        {
            Cls.CreateNewSqlCommand();
            Cls.AddParameter("@keywords", txtSearch.Text);
            var dt = Cls.GetData("sp_Get_Liabilities_Payment_Deadline_Receiver");
            StoreReportLiabilities_Payment_Deadline_Receiver.DataSource = dt.DefaultView.ToTable();
            StoreReportLiabilities_Payment_Deadline_Receiver.DataBind();
        }
    }
}